import request from '@/utils/request'

// 获取商品列表
export function goodsList(params) {
  return request({
    url: '/goods',
    method: 'get',
    params
  })
}

// 删除商品
export function delGoods(id) {
  return request({
    url: `/goods/${id}`,
    method: 'delete'
  })
}

// 新增商品
export function addGoods(data) {
  return request({
    url: '/goods',
    method: 'post',
    data
  })
}
